import React  from 'react'
import { Badge, TabBar } from 'antd-mobile'

import {
  AppOutline,
  MessageOutline,
  MessageFill,
  UnorderedListOutline,
  UserOutline,
} from 'antd-mobile-icons'

function Tabber() {
    const tabs = [
        {
          key: '/home',
          title: '首页',
          icon: <AppOutline />,
          badge: Badge.dot,
        },
        {
          key: '/todo',
          title: '订单',
          icon: <UnorderedListOutline />,
          badge: '5',
        },
        {
          key: '/message',
          title: '客服',
          icon: <UserOutline />,
        },
        {
            key: '/message',
            title: '我的',
            icon: <UserOutline />,
          },
      ]
  return (
    <div style={{position:'fixed', bottom:'0', left:'0',right:'0'}}>
       <TabBar onChange={(key)=>tabs(key)}>
          {tabs.map(item => (
            <TabBar.Item key={item.key} icon={item.icon} title={item.title} />
          ))}
        </TabBar>
    </div>
  )
}

export default Tabber
